package com.icehand.demo.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.icehand.entity.Demo;
import com.icehand.service.DemoService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhoujunmei
 * @date 2019-07-22 15:14
 */
@RestController
@RequestMapping("/v1/demo")
public class DemoController {
    @Reference
    private DemoService demoService;

    @RequestMapping("/{id}")
    public Demo get(@PathVariable("id")String id){
        return demoService.get(id);
    }
}
